/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.view;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;


/**
 *
 * @author Blasius
 */
public class PanelTambahAnggota extends JPanel implements ActionListener{
private JLabel labelKodeAnggota, labelNama,labelRadio, labelText; 
private JTextField textKodeAnggota, textNama;
private JButton tombolSimpan, tombolBatal; 
private JRadioButton Dosen, Mahasiswa; 

public PanelTambahAnggota(){
    this.setLayout(null); 
    this.setVisible(true);
    this.setSize(500,500);
        
     
    ButtonGroup bg = new ButtonGroup();
    labelRadio = new JLabel("Anggota");
        this.add(labelRadio); 
         labelRadio.setBounds(30,80,100,20);
    Dosen = new JRadioButton("Dosen");
        bg.add(Dosen);
        Dosen.setEnabled(true);
        this.add(Dosen);
        Dosen.setBounds(30, 80, 100, 20);
    Mahasiswa = new JRadioButton("Mahasiswa");
        bg.add(Mahasiswa);
        Mahasiswa.setEnabled(true);
        this.add(Mahasiswa);
        Mahasiswa.setBounds(30, 105, 100, 20);
    labelText = new JLabel("Data-data Anggota");
       
        this.add(labelText); 
        labelText.setBounds(20,145,150,20);
    labelNama = new JLabel("Nama = "); 
        labelNama.setBounds(30, 170, 70, 20);
        this.add(labelNama); 
        textNama = new JTextField(50); 
            textNama.setBounds(90,170,155,20); 
            this.add(textNama); 
    labelKodeAnggota = new JLabel("ID = "); 
        labelKodeAnggota.setBounds(30, 195, 70, 20);
        this.add(labelKodeAnggota); 
        textKodeAnggota = new JTextField(50); 
            textKodeAnggota.setBounds(90,195,155,20); 
            this.add(textKodeAnggota); 
    tombolSimpan = new JButton("OK ?"); 
        tombolSimpan.setBounds(20, 230, 110, 30);
        this.add(tombolSimpan); 
       

    tombolBatal = new JButton("Cancel ?"); 
        tombolBatal.setBounds(130,230,110,30); 
        this.add(tombolBatal); 

tombolSimpan.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
jtombolSimpanctionPerformed(evt);
}

        private void jtombolSimpanctionPerformed(ActionEvent evt) {
            throw new UnsupportedOperationException("Not yet implemented");
        }
    });
tombolBatal.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
jtombolBatalActionPerformed(evt);
}

        private void jtombolBatalActionPerformed(ActionEvent evt) {
            throw new UnsupportedOperationException("Not yet implemented");
        }
    });

   
}


@Override
    public void actionPerformed(ActionEvent e) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
